home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Scene 96
/
Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso
/
misc
/
coding
/
pump_src
/
cretab.c
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-24
|
1KB
|
30 lines
#include <math.h>
/*
This file is actually very special. It is the one used to generate the
'tabla.h' to drive one of the picture shows in the demo. The special thing
in it uses the hyperbolic sine and cosine functions, which are not a too
usual thing in the demoscene. I (Yann) remember when Jare, after around
15 continuous hours leaning on the keyboards, it was something like 7 AM,
looked over to my screen, and said something like 'Hyperbolic functions?',
with a voice I will never forget. I had to finish the thing fast so that
he would calm down from thinking that, after all, we were going to use
the functions from math.h in the library. He recovered quite well when
he saw this doomed code wouldn't be linked into the runtime.
*/
#define NSECS 2
main() {
double i;
double val;
for (i = 0; i < 70*NSECS; i++) {
val = (i-35*NSECS)/(10*NSECS);
val = - sinh(val) / cosh(val);
printf("%d,\n", 160+(int)(160.0*val));
}
}